<?php 
$ip = getip();
$time = time();
$sql = "insert into tttj.share_sign (share_uid,ip,ontime,appid) values ($uid,'$ip',$time,$appid)";
exec_db($sql);

$appcolor = getappcolor($appid);
$tpl->assign("appcolor",$appcolor);

$appname = getappname($appid);
$tpl->assign("appname",$appname);

switch ($appid)
{
	case 97: $url='http://ttth.tttj.com' ;break;
	case 96: $url='http://www.dza.cn' ;break;
	case 95: $url='http://www.2dz.com.cn' ;break;
	default: $url='http://www.tttj.com' ;
}
$tpl->assign("url",$url);

$tpl->display("{$tp}.html");
?>